<script>
  export default { // 向外暴露
    data() {
      return {
        count: 0
      }
    },
    methods: {
      add() {
        this.count ++;
      }
    }
  }
</script>

<template>
    <div>
      {{ count }}
    </div>
    <button @click="add">点我加1</button>
</template>

<style scoped>

</style>
